import React from 'react';

import { connect } from 'dva';

//import { Card, Divider, Button } from 'antd';


//import DescriptionList from '@/components/DescriptionList';
//const { Description } = DescriptionList;


@connect(({ partnerOrgModel }) => ({ partnerOrgModel }))
class Profile extends React.Component {
  state = {
  }

  async componentDidMount() {
    const { location: {query: { id } } } = this.props;
    if (id) {
      const { dispatch } = this.props;
      dispatch({
        type: 'partnerOrgModel/view',
        payload:  { id: Number(id) }
      });
    }
  }


  showForm() {
    const { dispatch } = this.props;
    dispatch({
      type: 'partnerOrgModel/show',
      payload: 'editForm'
    });

  }

  render() {
    const { partnerOrgModel: { record } } = this.props;

    const image = record.image

    console.log(record)

    return ( <img
              src={`data:image/jpeg;base64,${escape(image)}`}
              alt="example"
              style={{width: '20%',height:'20%' }}

            /> );
  }
}

export default Profile;


